{template 'header', 'member'}
<!--main-block start-->
<div class="main-block bd-gray mt10">
	<div class="hd fn-clear">
		<h2 class="fn-left">发布招聘</h2>
	</div>
	<ul id="data-nav" class="main-nav mt10 fn-clear">
		<li id="status_"><a href="{url('member/my')}?mid={$mid}&action=add">添加招聘</a></li>
		<li id="status_3"><a href="{url('member/my')}?mid={$mid}&status=3">已发布({$nums[3]})</a></li>
		<li id="status_2"><a href="{url('member/my')}?mid={$mid}&status=2">审核中({$nums[2]})</a></li>
		<li id="status_1"><a href="{url('member/my')}?mid={$mid}&status=1">未通过({$nums[1]})</a></li>
		<li id="status_4"><a href="{url('member/my')}?mid={$mid}&status=4">已过期({$nums[4]})</a></li>
		<li id="status_5"><a href="{url('member/my')}?mid={$mid}&action=resume&status=5">收到简历({$nums[resume]})</a></li>
		<li id="status_6"><a href="{url('member/my')}?mid={$mid}&action=talent&status=6">人才库({$nums[talent]})</a></li>
	</ul>
	{if $action=='add' || $action=='edit'}
	<form id="pub-form" name="pub-form" method="post" action="{url('member/my')}">
		<input type="hidden" name="action" value="{$action}"/>
		<input type="hidden" name="mid" value="{$mid}"/>
		<input type="hidden" name="itemid" value="{$itemid}"/>
		<input type="hidden" name="forward" value="{$forward}"/>
		<table class="data-form">
			{if $status==1 && $action=='edit' && $note}
			<tr>
				<th width="90">未通过原因</th>
				<td width="640">{$note}</td>
			</tr>
			{/if}
			<tr>
				<th width="90"><span class="cred">*</span> 信息标题</th>
				<td width="640"><input name="post[title]" type="text"  id="title" size="50" class="graybd-ipt easyui-validatebox" data-options="required:true,validType:'length[3,50]',invalidMessage:'长度在3-50内',missingMessage:'请输入标题'" value="{$title}"/> <span id="dtitle" class="cred"></span></td>
			</tr>
			<tr>
				<th width="90"><span class="cred">*</span> 行业/职位</th>
				<td width="640">{Post::catTree('post[catid]', $moduleid, '选择分类' ,$catid, 'class="easyui-validatebox" data-options="required:true,missingMessage:\'请选择分类\'"')} <span id="dcatid" class="cred"></span></td>
			</tr>

			<tr>
				<th width="90">招聘部门 </th>
				<td width="640"><input name="post[department]" type="text" id="department" class="easyui-validatebox graybd-ipt" size="30"  value="{$department}"/> <span id="ddepartment" class="cred"></span></td>
			</tr>
			<tr>
				<th width="90"><span class="cred">*</span> 招聘人数</th>
				<td width="640"><input name="post[total]" type="text" id="total" class="graybd-ipt easyui-validatebox" data-options="required:true,validType:'length[1,50]',missingMessage:'请填写招聘人数'" size="6" value="{$total}" /> 人 (填0为若干)</td>
			</tr>
			<tr>
				<th width="90"><span class="cred">*</span> 待遇水平</th>
				<td width="640"><input name="post[minsalary]" type="text" class="graybd-ipt easyui-validatebox" data-options="required:true,validType:'length[1,50]',missingMessage:'请填写待遇水平'"  id="minsalary" size="6" value="{$minsalary}"/> 至 <input name="post[maxsalary]" type="text"
				                                                                                                                                                                                                                                       class="easyui-validatebox graybd-ipt" id="maxsalary" size="6" value="{$maxsalary}"/>
					{$DT[money_unit]}/月 (填0为面议)</td>
			</tr>
			<tr>
				<th width="90"><span class="cred">*</span> 工作地区</th>
				<td width="640">
					{if $action == 'add'}
					{Post::areaCombo('post[areaid]', $userInfo[areaid], '', '', $moduleid )}
					{elseif $action =='edit'}
					{Post::areaCombo('post[areaid]', $areaid, '', '', $moduleid )}
					{/if}
				</td>
			</tr>
			<tr>
				<th width="90"><span class="cred">*</span> 工作性质</th>
				<td width="640">
					{loop $TYPE $k $v}
					<input class="nobd fn-left mr5" type="radio" name="post[type]" id="type_{$k}" value="{$k}"{if $k == $type} checked{/if}/>
                    <label class="fn-left mr10" for="type_{$k}"> {$v}</label>
					{/loop}
				</td>
			</tr>
			<tr>
				<th width="90"><span class="cred">*</span> 性别要求</th>
				<td width="640">
					{loop $GENDER $k $v}
					<input class="nobd fn-left mr5" type="radio" name="post[gender]" id="gender_{$k}" value="{$k}"{if $k == $gender} checked{/if}/>
                    <label class="fn-left mr10" for="gender_{$k}"> {$v}</label>
					{/loop}
				</td>
			</tr>
			<tr>
				<th width="90"><span class="cred">*</span> 婚姻要求</th>
				<td width="640">
					{loop $MARRIAGE $k $v}
					<input class="nobd fn-left mr5" type="radio" name="post[marriage]" id="marriage_{$k}" value="{$k}"{if $k == $marriage} checked{/if}/>
                    <label class="fn-left mr10" for="marriage_{$k}"> {$v}</label>
					{/loop}
				</td>
			</tr>
			<tr>
				<th width="90"><span class="cred">*</span> 学历要求</th>
				<td width="640">
					{loop $EDUCATION $k $v}
					<input class="nobd fn-left mr5" type="radio" name="post[education]" id="education_{$k}" value="{$k}"{if $k == $education} checked{/if}/>
                    <label class="fn-left mr10" for="education_{$k}"> {$v}</label>
					{/loop}
					(以上)
				</td>
			</tr>
			<tr>
				<th width="90"><span class="cred">*</span> 年龄要求</th>
				<td width="640"><input name="post[minage]" type="text" id="minage" class="graybd-ipt easyui-validatebox" data-options="required:true,validType:'length[1,50]',missingMessage:'请填写年龄要求'" size="5" value="{$minage}"/> 至 <input name="post[maxage]" class="
				easyui-validatebox graybd-ipt" type="text" id="maxage" size="5" value="{$maxage}"/> 周岁 (填0为不限)</td>
			</tr>
			<tr>
				<th width="90"><span class="cred">*</span> 工作经验</th>
				<td width="640">
					<select name="post[experience]" id="experience">
						<option value="0">不限</option>
						{php for($i = 1; $i < 21; $i++) { }
						<option value="{$i}"{if $i == $experience} selected{/if}>{$i}</option>
						{php } }
					</select> &nbsp;&nbsp;年以上</td>
			</tr>
			{if $FD}{fields_html('<td class="tl">', '<td class="tr">', $item)}{/if}
			<tr>
				<th width="90"><span class="cred">*</span> 具体要求</th>
				<td width="640">
					{Post::kindEditor('post[content]', $moduleid, $content, 'datatype="*5-99999" nullmsg="请填写详细说明" errormsg="详细说明最少5字"','675px')}
				</td>
			</tr>
			<tr>
				<th>过期时间</th>
				<td class="tr">{Post::calender('post[totime]', $totime, 'width:100', true)}</td>
			</tr>
			<tr{if $_userid} style="display:none;"{/if}>
			<th width="90"><span class="cred">*</span> 企业名称</th>
			<td width="640"><input name="post[company]" type="text" id="company" size="50" value="{$company}" class="easyui-validatebox graybd-ipt"/> 个人请填 姓名(个人) 例如：张三(个人)<br/><span id="dcompany" class="cred"></span> </td>
			</tr>

			<tr>
				<th width="90"><span class="cred">*</span> 联系人</th>
				<td width="640"><input name="post[truename]" type="text" id="truename" class="graybd-ipt easyui-validatebox" data-options="required:true,validType:'length[1,50]',missingMessage:'请填写联系人'"  size="20" datatype="*2-999" nullmsg="请填写联系人" errormsg="最少输入2个字符"  value="{$truename}" /> <br/>
					<span id="dtruename" class="cred"></span></td>
			</tr>

			<tr>
				<th width="90"><span class="cred">*</span> 性别</th>
				<td width="640">
					<input id="male" class="nobd fn-left mr5" type="radio" name="post[sex]" value="1"{if $sex == 1} checked="checked"{/if}/>
                    <label for="male" class="fn-left mr10" > 先生</label>
					<input id="female" class="nobd fn-left mr5" type="radio" name="post[sex]" value="2"{if $sex == 2} checked="checked"{/if}/>
                    <label for="female" class="fn-left mr10" > 女士</label>
				</td>
			</tr>

			<tr>
				<th width="90"><span class="cred">*</span> 联系电话</th>
				<td width="640"><input name="post_fields[tel]" type="text" size="30" class="graybd-ipt easyui-validatebox" data-options="required:true,validType:'length[3,50]',missingMessage:'请填写联系电话'"  value="{$tel}" /><span id="dtel" class="cred"></span></td>
			</tr>
			<tr>
				<th width="90">联系地址</th>
				<td width="640"><input name="post[address]" type="text" size="60" class="easyui-validatebox graybd-ipt" value="{$address}"/></td>
			</tr>
			{if $need_captcha}
			<tr>
				<th><span class="cred">*</span> 验证码</th>
				<td class="tr">{template 'captcha', 'chip'} <span id="dcaptcha" class="cred"></span></td>
			</tr>
			{/if}
			<tr>
				<th>&nbsp;</th>
				<td class="sub-info">
					<button type="submit" class="btn">提 交</button>
					<input type="button" value=" 返 回 " class="btn" onclick="history.back(-1);"/>
				</td>
			</tr>
		</table>
	</form>
	<script type="text/javascript">
		seajs.use(['$','easyui','easyui-css'], function ($) {
			$("#pub-form").form();
		});
	</script>
	{elseif $action == 'resume'}
	<div class="filter con fn-clear">
		<form id="buy-filter-form" name="buy-filter-form" action="{url('member/my')}" method="post">
			<input type="hidden" name="mid" value="{$mid}"/>
			<input type="hidden" name="action" value="{$action}"/>
			<input type="hidden" name="status" value="{$status}"/>
			<input class="fn-left mr10" type="text" name="kw" value="{$kw}" title="关键词" size='60'/>
			<button class="btn fn-left mr20" type="submit">搜索</button>
			<button class="btn fn-left" type="reset" onclick="window.location='{url('member/my')}?mid={$mid}&status={$status}&action=resume';">重置</button>
		</form>
	</div>
	<form method="post" action="{url('member/my')}">
		<table class="filter-tb mt10 c000 con">
			<thead>
			<tr class="c666">
					<th width='80'>应聘岗位</th>
					<th width='60'>姓名</th>
					<th width='40'>性别</th>
					<th width='50'>学历</th>
					<th width='40'>年龄</th>
					<th width='60'>工作经验</th>
					<th width='80'>应聘时间</th>
					<th width='60'>状态</th>
					<th width='60'>面试邀请</th>
					<th width="40">管理</th>
			</tr>
			</thead>
			<tbody id="pub-list">
				{loop $lists $k $v}
				<tr>
					<td><a href="{url($module.'/show', 'itemid='.$v['itemid'])}" target="_blank">{$v[title]}</a></td>

					<td><a href="{url('member/my')}?mid={$mid}&action=resume_show&itemid={$v[applyid]}&resumeid={$v[resumeid]}&jobid={$v[jobid]}" target="_blank" class="t" title="点击查看简历">{$v[truename]}</a></td>

					<td>{if $v[gender]==1}男{else}女{/if}</td>

					<td>&nbsp;{$EDUCATION[$v[education]]}&nbsp;</td>

					<td>&nbsp;{$v[age]}&nbsp;</td>
					<td>&nbsp;{if $v[experience]}{$v[experience]}年{else}无{/if}&nbsp;</td>

					<td class="f_gray px11">{timetodate($v[applytime], 4)}</td>

					<td>
						&nbsp;
						<a href="{url('member/my')}?mid={$mid}&action=resume_show&itemid={$v[applyid]}&resumeid={$v[resumeid]}&jobid={$v[jobid]}" target="_blank" title="点击查看简历">{if $v[status] == 1}<span class="cred">未查看</span>{else}已查看{/if}</a>
						&nbsp;
					</td>

					<td>
						&nbsp;
						<a href="{url('member/my')}?mid={$mid}&action=resume_invite&itemid={$v[applyid]}&resumeid={$v[resumeid]}&jobid={$v[jobid]}" target="_blank" title="点击邀请面试">{if $v[status] == 3}已邀请{else}<span class="cred">未邀请</span>{/if}</a>
						&nbsp;
					</td>

					<td class="pub-oper">
						<a href="{url('member/my')}?mid={$mid}&action=resume_delete&itemid={$v[applyid]}&resumeid={$v[resumeid]}&jobid={$v[jobid]}" onClick="return confirm('确定要删除吗？此操作将不可撤销');"><img width="16" height="16" src="image/delete.png" title="删除" alt=""/></a>
					</td>
				</tr>
				{/loop}
			</tbody>
		</table>
		<div class="pages con fn-clear">
			<span class="sum fn-right">共{php echo $do->getPn()->getPages()}页</span>
			<ul class="fn-right fn-clear">
				{php $do->getPn()->render()}
			</ul>
		</div>
	{elseif $action == 'talent'}
		<div class="filter con fn-clear">
			<form id="buy-filter-form" name="buy-filter-form" action="{url('member/my')}" method="post">
				<input type="hidden" name="mid" value="{$mid}"/>
				<input type="hidden" name="status" value="{$status}"/>
				{Post::catTree('catid', $moduleid, '行业/职位', $catid, 'class="fn-left mr10"')}
				<input class="fn-left mr10" type="text" name="kw" value="{$kw}" title="关键词" size='60'/>&nbsp;
				<button class="btn fn-left mr20" type="submit">搜索</button>
				<button class="btn fn-left" type="reset" onclick="window.location='{url('member/my')}?mid={$mid}&status={$status}&action={$action}';">重置</button>
			</form>
		</div>
		<form method="post" action="{url('member/my')}">
			<table class="filter-tb mt10 c000 con">
				<thead>
				<tr class="c666">
				<th width='65'>姓名</th>
				<th width='40'>性别</th>
				<th width='50'>学历</th>
				<th width='180'>毕业学校</th>
				<th width='80'>职位</th>
				<th width='150'>居住地</th>
				<th width='80'>添加时间</th>
				<th width="40">管理</th>
				</tr>
				</thead>
				<tbody id="pub-list">
			{loop $lists $k $v}
			<tr>
				<td >&nbsp;&nbsp;&nbsp;<a href="{url($module.'/show', 'itemid='.$v['itemid'])}" target="_blank" class="t">{$v[truename]}</a></td>

				<td>{if $v[gender]==1}男{else}女{/if}</td>

				<td>&nbsp;{$EDUCATION[$v[education]]}&nbsp;</td>

				<td>&nbsp;{$v[school]}&nbsp;</td>

				<td>{$CATEGORY[$v[catid]][catname]}</td>

				<td >{area_pos($v[areaid], '')}</td>

				<td  class="c666">{timetodate($v[jointime], 4)}</td>

				<td class="pub-oper">
					<a class="del" href="{url('member/my')}?mid={$mid}&action=talent_delete&itemid={$v[itemid]}" onclick="return confirm('确定要删除吗？此操作将不可撤销');" title="删除"></a>
				</td>
			</tr>
			{/loop}
			</tbody>
		</table>
			<div class="pages con fn-clear">
				<span class="sum fn-right">共{php echo $do->getPn()->getPages()}页</span>
				<ul class="fn-right fn-clear">
					{php $do->getPn()->render()}
				</ul>
		   </div>
	{else}
	<div class="filter con fn-clear">
		<form id="buy-filter-form" name="buy-filter-form" action="{url('member/my')}" method="post">
			<input type="hidden" name="mid" value="{$mid}"/>
			<input type="hidden" name="status" value="{$status}"/>
			{Post::catTree('catid', $moduleid, '行业/职位', $catid, 'class="fn-left mr10"')}
			<input class="fn-left mr10" type="text" name="kw" value="{$kw}" title="关键词" size='60'/>
			<button class="btn fn-left mr20" type="submit">搜索</button>
			<button class="btn fn-left" type="reset" onclick="window.location='{url('member/my')}?mid={$mid}&status={$status}';">重置</button>
		</form>
	</div>
	<form method="post" action="{url('member/my')}">
		<table class="filter-tb mt10 c000 con">
			<thead>
			<tr class="c666">
				<th width="550"><input id="sel-all" class="nobd fn-left mr10" type="checkbox"><label class="fn-left" for="sel-all">标 题</label></th>
				<th width='160'>职 位</th>
				<th width='50'>人 数</th>
				<th width='150'>{if $timetype=='add'}添加{else}更新{/if}时间</th>
				<th width='100'>浏览</th>
				<th width='100'>简历</th>
				<th width='150'>管理</th>
			</tr>
			</thead>
			<tbody id="pub-list">
			{loop $lists $k $v}
			<tr>
				<td>
					<input type="checkbox" name="itemid[]" class="nobd fn-left mr10" value="{$v[itemid]}"/>
                    {if $v[status]==3}
                    <a class="fn-left" href="{url($module.'/show', 'itemid='.$v['itemid'])}" target="_blank">{$v[title]}</a>
                    {else}
                    <a class="fn-left" href="{url('member/my')}?mid={$mid}&action=edit&itemid={$v[itemid]}">{$v[title]}</a>
                    {/if}
				</td>
				<td><a href="{url('job/list', 'catid='.$v['catid'])}" target="_blank">{$CATEGORY[$v[catid]][catname]}</a></td>
				<td>{$v[total]}</td>
				{if $timetype=='add'}
				<td class="c666" title="更新时间 {$v[editdate]}">{$v[adddate]}</td>
				{else}
				<td class="c666" title="添加时间 {$v[adddate]}">{$v[editdate]}</td>
				{/if}
				<td class="c666">{$v[hits]}</td>
				<td class="c666"><a href="{url('member/my')}?mid={$mid}&action=resume&itemid={$v[itemid]}"><span class="{if $v[apply]}cred{else}f_gray{/if}">{$v[apply]}</span></a></td>
				<td class="pub-oper">
					<a class="edit-link" href="{url('member/my')}?mid={$mid}&action=edit&itemid={$v[itemid]}" title="编辑">编辑</a>
					{if $MG[copy]}
					<a class="copy" href="{url('member/my')}?mid={$mid}&action=add&itemid={$v[itemid]}&catid={$v[catid]}" title="复制">复制</a>
					{/if}
					{if $MG[delete]}
					<a class="del" href="{url('member/my')}?mid={$mid}&action=delete&itemid={$v[itemid]}" onclick="return confirm('确定要删除吗？此操作将不可撤销');" title="删除"></a>
					{/if}
				</td>
			</tr>
			{/loop}
			</tbody>
		</table>
		{if $MG[delete] || $timetype!='add'}
		<div class="con fn-clear">
			{if $MG[delete]}
			<button onclick="if( confirm('确定要删除选中{$MOD[name]}吗？')){this.form.action='?mid={$mid}&status={$status}&action=delete'}else{return false;}" class="btn fn-right">删除选中</button>
			{/if}
			{if $timetype!='add'}
			<button onclick="this.form.action='?mid={$mid}&status={$status}&action=refresh';" class="btn fn-left">刷新选中</button>
			{if $MOD[credit_refresh]}
			刷新一条信息一次需消费 <strong class="cred">{$MOD[credit_refresh]}</strong> 积分，当积分不足时将不可刷新
			{/if}
			{/if}
		</div>
		{/if}
	</form>
	{if $MG[job_limit] || (!$MG['fee_mode'] && $MOD[fee_add])}
	<div class="con">
		{if $MG[job_limit]}
		总共可发 <span class="f_b cred">{$MG[job_limit]}</span> 条&nbsp;&nbsp;&nbsp;
		当前已发 <span class="f_b">{$limit_used}</span> 条&nbsp;&nbsp;&nbsp;
		还可以发 <span class="f_b f_blue">{$limit_free}</span> 条&nbsp;&nbsp;&nbsp;
		{/if}
	</div>
	{/if}
	<div class="pages con fn-clear">
		<span class="sum fn-right">共{php echo $do->getPn()->getPages()}页</span>
		<ul class="fn-right fn-clear">
			{php $do->getPn()->render()}
		</ul>
	</div>
	{/if}
</div>
{if $action == 'add' || $action == 'edit'}
<script type="text/javascript">
	seajs.use(['$', 'vf', 'vf-css', 'easyui','easyui-css'], function($){
		$('#dform').Validform({
			beforeCheck:function(curform){
				lemon.editor.post_content_.sync();
			}
		});
	})
</script>
{/if}
<script type="text/javascript">
	seajs.use(['member'], function(member){
		member.active('menu_info', 'mid_job', 'status_{$status}')
	})
</script>
{template 'footer', 'member'}
